﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace _010_011_012操作符详解_4_
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Form myForm = new Form();
            //myForm.Text = "Hello";
            //myForm.ShowDialog();

            //var newFrom = new Form() { Text = "初始化器",FormBorderStyle=FormBorderStyle.SizableToolWindow};
            //newFrom.ShowDialog();

            //C#语法糖  
            int[] array = new int[10];
            int[] array2 = { 0, 4, 5, 5, 1 };
            //string是引用类型 但是无需通过new操作符
            string name1 = "ctx";
            string name2 = new string(new char[] { 'l', 'j', 'y' });

            //new 也可以跟匿名类型
           var person= new { Name="lili",age=21};
            Console.WriteLine(person.Name+person.age);
            Console.WriteLine(person.GetType().Name);
        }
    }
}
